package com.itljm.cxrMarket.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itljm.cxrMarket.entity.Reviews;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReviewsMapper extends BaseMapper<Reviews> {
    List<Reviews> selectReviewsPage(Page<Reviews> page, @Param("ew") Wrapper<Reviews> entityWrapper);
    Reviews getReviewToProductsByUserIdAndProductId(@Param("userId") Long userId, @Param("productId") Integer productId);
    int updateLikeNum(@Param("userId") Long userId, @Param("reviewId") Integer reviewId);

    Reviews selectLikeTop(Integer productId);
}




